function [MassInt,Stiff_UU,Stiff_UV,Stiff_VV,Indx1_cell,Indx2_cell] = get_assMS_common(d_max)
% get quadrature infomations:
  [qw,qp] = quad_rule(13);  
  MassInt = cell(d_max,1);
  Stiff_UU = cell(d_max,1);
  Stiff_UV = cell(d_max,1);
  Stiff_VV = cell(d_max,1);
  Indx1_cell = cell(d_max,1);
  Indx2_cell = cell(d_max,1);
  % pre-set the value of the cell matrix
  for d=1:d_max
      m = (d+1)*(d+2)/2;     
      [phi,phi_u,phi_v] = eval_bb(d,qp(1,:),qp(2,:)); 
      msqr = m*m;
      matMass = zeros(msqr,1);
      matUU = zeros(msqr,1);
      matUV = zeros(msqr,1);
      matVV = zeros(msqr,1);
      for j=1:m  % the column first
         for i=1:m
            matMass((j-1)*m+i) = (phi(i,:).*phi(j,:))*qw' ;
            matUU((j-1)*m+i) = (phi_u(i,:).*phi_u(j,:))*qw';
            matUV((j-1)*m+i) = (phi_u(i,:).*phi_v(j,:)+phi_v(i,:).*phi_u(j,:))*qw';
            matVV((j-1)*m+i) = (phi_v(i,:).*phi_v(j,:))*qw';
         end
      end  
      MassInt{d} = matMass;
      Stiff_UU{d} = matUU;
      Stiff_UV{d} = matUV;
      Stiff_VV{d} = matVV;
      temp = diag(1:m)*ones(m,m);
      % row index
      Indx1_cell{d} = reshape(temp,m*m,1);
      % column index
      Indx2_cell{d} = reshape(temp',m*m,1);
  end